//
//  MyPageViewController.m
//  OneWordNew
//
//  Created by qianfeng001 on 15-7-7.
//  Copyright (c) 2015年 朱共营. All rights reserved.
//

#import "MyPageViewController.h"
#import "MyLoginSetViewController.h"
#import "UIImageView+WebCache.h"
@interface MyPageViewController ()

@end

@implementation MyPageViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.automaticallyAdjustsScrollViewInsets=NO;
    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed: @"top"] forBarMetrics:UIBarMetricsDefault];
    [self hideButton];
    [self showdataWithStr];
   
}
- (void)hideButton{
    self.imageView.layer.masksToBounds=YES;
    self.imageView.layer.cornerRadius=70;
    //UIBarButtonItem *item=[[UIBarButtonItem alloc] initWithTitle:@" " style:UIBarButtonItemStylePlain target:self action:nil];
    //self.navigationItem.leftBarButtonItem=item;

}
- (void)showdataWithStr{
    self.nameLable.text=self.namestr;
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:self.imagestr] placeholderImage:[UIImage imageNamed: @"moren.png"]];

}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


- (IBAction)setClick:(UIButton *)sender {
    MyLoginSetViewController *mylog=[[MyLoginSetViewController alloc] init];
    
    [self.navigationController pushViewController:mylog animated:YES];
    
}
- (void)viewWillAppear:(BOOL)animated{
    NSString *name=[[NSUserDefaults standardUserDefaults] objectForKey:@"nickname"];
    self.nameLable.text=name;
    self.tabBarController.tabBar.hidden=NO;
}

//- (void)viewWillDisappear:(BOOL)animated{
//    NSString *token=[[NSUserDefaults standardUserDefaults] objectForKey:@"token"];
//    NSString *name=[[NSUserDefaults standardUserDefaults] objectForKey:@"nickname"];
//    
//    if (token!=nil&&name!=nil) {
//        MyPageViewController *page=[[MyPageViewController alloc] init];
//        [self.navigationController pushViewController:page animated:NO];
//        return;
//    }
//    
//    
//}



@end
